import config from "@/config"
import http from "@/utils/request"

export default {
    addTemplate: {
        url: `${config.API_URL}/tool/template/add`,
        name: "新增模板",
        post: function (toolTemplateAddVo) {
            return http.post(this.url, toolTemplateAddVo);
        }
    },
    delTemplate: {
        url: `${config.API_URL}/tool/template/del`,
        name: "多选级联删除模板",
        delete: function (templateIdList) {
            return http.delete(this.url, templateIdList);
        }
    },
    editTemplate: {
        url: `${config.API_URL}/tool/template/edit`,
        name: "修改模板信息",
        put: function (toolTemplateEditVo) {
            return http.put(this.url, toolTemplateEditVo);
        }
    },
    getTemplateById: {
        url: `${config.API_URL}/tool/template/info`,
        name: "根据ID获取模板详情",
        get: function (templateId) {
            return http.get(this.url + "/" + templateId);
        }
    },
    pageListTemplate: {
        url: `${config.API_URL}/tool/template/pageList`,
        name: "分页查询模板列表",
        get: function (toolTemplateQueryVo) {
            return http.get(this.url, toolTemplateQueryVo);
        }
    }
}
